import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        indexTitle: {
            CSDN: "",
            Github: "",
            Know: "",
            maxim: "",
            "micro-blog": "",
            motto: [],
            name: "",
            qq: "",
            webName: "",
            webImg: {},
        }
    },
    getters: {},
    mutations: {
        indexTitle(state, content) {

            for (let i in state.indexTitle) {

                state.indexTitle[i] = content[i];
            };
        }
    },
    actions: {
        addIndexTitle({ state, commit }, content) {
            return new Promise((resolve, reject) => {
                commit("indexTitle", content);
                resolve("数据载入成功");
            })



        }
    },
    modules: {}
})